DevJourney

NodeJS/geeksforgeekstutorial/File Server/File Management/Open File/server.js

var fs = require('fs');

fs.open('mynewfile2.txt', 'w', function (err, file) {
  if (err) throw err;
  console.log('Saved!');
});
View on GitHub